class YarisArabasiBir extends Thread {

	public void run() {


		for (int i=0 ; i<10; i++) {

			try {
				if (Thread.interrupted()) {
					System.out.println("YarisArabasiBir-Uykusu bolundu - "
														 +Thread.interrupted()); //14
				}

				System.out.println("YarisArabasiBir uyuyor....");
				Thread.sleep(40 * 10);

			} catch (InterruptedException iEx) {
				// bosver
			}
		}
	}
}


class YarisArabasiIki extends Thread {

	public void run() {

		for (int i=0 ; i<10; i++) {

			try {

				if (this.isInterrupted()) {
					System.out.println("YarisArabasiIki-Uykusu bolundu - "
														 +this.isInterrupted()); //38
				}

				System.out.println("YarisArabasiIki uyuyor....");
				Thread.sleep(60 * 10);

			} catch (InterruptedException iEx) {
				// bosver
			}
		}
	}
}


public class UykuTest2 {

	public static void main(String args[]) throws Exception {
		YarisArabasiBir ya1 = new YarisArabasiBir(); 
		YarisArabasiIki ya2 = new YarisArabasiIki(); 

		ya1.start();
		ya2.start();

		ya1.interrupt();
		ya2.interrupt();

	}
}
